
from conn_mysql.api_mysql import ApiMysql

from flask import Flask, request, Blueprint, render_template

from . import app_login

app = Flask(__name__)

@app_login.route('/register', methods=['GET', 'POST'])

def register():

    methods = request.method

    info = request.form

    phone = info.get('user')

    verify_code = info.get('verify_code')

    pass_word_one = info.get('pass_word_one')
    
    pass_word_two = info.get('pass_word_two')

    with ApiMysql() as conn_api:

        conn_info = conn_api.register(methods, phone, verify_code, pass_word_one, pass_word_two)

    return conn_info
